package com.jy.controller;

import cn.hutool.core.util.StrUtil;
import com.jy.entity.Platenumber;
import com.jy.service.IPlatenumberService;
import com.jy.vo.PlateJsonResult;
import com.jy.vo.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Xiexingxie
 * @date 2022/11/21 下午 02:46
 */

@RestController
@RequestMapping("/platenumber")
public class PlatenumberController {
    
    @Autowired
    private IPlatenumberService iPlatenumberService;

    /**
     * 给车位录入车牌
     * @param platenumber
     * @return
     */
    @PostMapping("/insertplatenumber")
    public Result insertPlateNumber(@RequestBody Platenumber platenumber){
        boolean save = iPlatenumberService.save(platenumber);
        return save ? Result.success(save) : Result.failed();
    }
    
}
